package org.lex.dbq.model.service;

import java.io.IOException;

import org.lex.dbq.model.bo.Session;
import org.lex.dbq.model.conf.Conf;
import org.lex.dbq.model.conf.ConfLoader;

public class SessionService extends CommonService<Session> {
	private static final SessionService INSTANCE = new SessionService();

	public static SessionService getInstance() {
		return INSTANCE;
	}

	@Override
	public void store() throws IOException {
		ConfLoader.storeSessions(Conf.SESSIONS_CONF_FILE, this.getAllObjects());
	}

	private SessionService() {
		ConfLoader.loadSessions(Conf.SESSIONS_CONF_FILE, this);
	}
}
